Skip to content

Bump pi-coding-agent to 0.82.1 to resolve protobufjs DoS alert #292 - #4357

Merged
wojtekn merged 6 commits into
trunkfrom
bump-pi-coding-agent-0.82.1-protobufjs
Jul 29, 2026
Merged

Bump pi-coding-agent to 0.82.1 to resolve protobufjs DoS alert #292#4357
wojtekn merged 6 commits into
trunkfrom
bump-pi-coding-agent-0.82.1-protobufjs

Conversation

@wojtekn

@wojtekn wojtekn commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

Claude Code traced the alert to its root cause, identified that pi-coding-agent's bundled npm-shrinkwrap.json was pinning the vulnerable transitive dependency, confirmed a newer release ships the fix, applied the version bumps, and ran typecheck + the affected test suites. All findings were reviewed by me.

Proposed Changes

Dependabot flags a medium-severity denial-of-service in protobufjs (>= 7.5.0, <= 7.6.4) — an infinite loop in .proto option parsing, fixed upstream in 7.6.5. We don't depend on protobufjs directly; it arrives transitively through pi-coding-agent@google/genai.

The catch: pi-coding-agent@0.81.0 publishes its own npm-shrinkwrap.json that hard-pins its entire subtree, including protobufjs@7.6.4. Because npm honors a package's bundled shrinkwrap, the nested copy can't be lifted by a root-level npm dedupe, an install protobufjs@7.6.5, or an overrides entry — the only clean fix is upgrading pi-coding-agent itself. Version 0.82.1 ships protobufjs@7.6.5 in its shrinkwrap.

This bumps @earendil-works/pi-coding-agent (and @earendil-works/pi-ai, declared in apps/cli) from 0.81.0 to 0.82.1. Both the top-level and the nested protobufjs copies now resolve to 7.6.5, clearing the alert. The 0.82.x release notes are additive (new provider support, opt-in constrained tool sampling, fixes) with no breaking API changes; same remediation pattern as the earlier #288 brace-expansion bump.

No user-visible behavior change.

Testing Instructions

  • npm install resolves both protobufjs copies (top-level and the one nested under pi-coding-agent) to 7.6.5 — verify with npm ls protobufjs.
  • npm run typecheck passes across all workspaces (the pi packages have a wide type-import surface, so this confirms no signatures changed).
  • AI test suites pass: npm test -- apps/cli/ai packages/common/ai apps/studio/src/components/studio-code-session apps/cli/remote-session (498 tests).

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

Dependabot alert #292 (GHSA-j3f2-48v5-ccww) flags a medium-severity DoS in
protobufjs <= 7.6.4, pulled in transitively via pi-coding-agent's bundled
@google/genai. The package's own npm-shrinkwrap pins protobufjs, so it can
only be moved by upgrading pi-coding-agent. 0.82.1 ships protobufjs 7.6.5.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@wpmobilebot

wpmobilebot commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing df90bd6 vs trunk

app-size

Metric trunk df90bd6 Diff Change
App Size (Mac) 1375.40 MB 1378.86 MB +3.46 MB 🔴 0.3%

site-editor

Metric trunk df90bd6 Diff Change
load 733 ms 1071 ms +338 ms 🔴 46.1%

site-startup

Metric trunk df90bd6 Diff Change
siteCreation 6517 ms 6502 ms 15 ms ⚪ 0.0%
siteStartup 2388 ms 2380 ms 8 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

wojtekn and others added 4 commits July 27, 2026 16:13
pi-agent-core 0.82.1 types AgentTool.execute params from the tool's own
schema, so a concrete AgentTool no longer widens into AgentTool<any> (the
contravariant execute param made the assignment fail under strict typing).
Make renameTool generic over the tool schema so each tool keeps its type
through the rename, fixing the CI typecheck.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@wojtekn
wojtekn merged commit 52bafd2 into trunk Jul 29, 2026
13 checks passed
@wojtekn
wojtekn deleted the bump-pi-coding-agent-0.82.1-protobufjs branch July 29, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants